Skip to content

Fix handling of style property in Tabs component#139

Open
clarasb wants to merge 6 commits intomainfrom
clarasb-135-component_visibility
Open

Fix handling of style property in Tabs component#139
clarasb wants to merge 6 commits intomainfrom
clarasb-135-component_visibility

Conversation

@clarasb
Copy link
Collaborator

@clarasb clarasb commented Feb 11, 2026

This PR:

  • fixes handling of style prop in Tabs component.
  • adds the prop iconPosition to Tabs component
  • extends the demo Panel H to refelct the changes made in this PR.

Example Panel H (chartlets.py/demo/my_extension/my_panel_8.py):

grafik grafik

Closes #135 and #136.

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.22%. Comparing base (c707e53) to head (fde84a7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #139   +/-   ##
=======================================
  Coverage   92.21%   92.22%           
=======================================
  Files          86       86           
  Lines        1503     1504    +1     
  Branches      231      230    -1     
=======================================
+ Hits         1386     1387    +1     
  Misses         98       98           
  Partials       19       19           
Flag Coverage Δ
backend 100.00% <100.00%> (ø)
frontend 83.88% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@clarasb clarasb marked this pull request as ready for review February 12, 2026 14:28
@clarasb clarasb requested review from b-yogesh and forman and removed request for b-yogesh February 12, 2026 14:28
Copy link
Collaborator

@b-yogesh b-yogesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Looks good. Please have a look at my comments.

type: "Tab";
label?: string;
icon?: string;
iconPosition?: "bottom" | "end" | "start" | "top" | undefined;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have undefined here?
Also, in the API docs https://mui.com/material-ui/api/tab/, the default is set to top. If you change that to undefined, does it affect it in any way?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, undefined shouldn't be here. I removed it.

return (
<MuiTab
key={index}
style={tabState?.style}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we apply the same style to both the Tab button and body, was this a design decision? or does it needs discussion?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, this enables a user to apply styling to the entire Tab component (Button in the header + body).

Before this change it was only possible to change the styling of the button and the user had no styling control over the content (body) of the Tab (see #135).

However, this desicion was not discussed.

@clarasb clarasb requested a review from b-yogesh February 18, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tabs component visibility cannot be controlled consistently for subcomponents

2 participants

Comments